package client.handler;

import client.Client;
import unit.response.LoginRequestResponse;
import unit.response.Response;

/**
 * Created by IntelliJ IDEA.
 * User: victorn
 * Date: 8/23/11
 * Time: 12:16 AM
 * To change this template use File | Settings | File Templates.
 */
public class LoginResponseHandler extends AbstractResponseHandler {


    public LoginResponseHandler(Client client) {
        super(client);
    }

    @Override
    public void handleRequest(Response response) {

        client.clientID = ((LoginRequestResponse) response).getUserId();

        client.currentSession = ((LoginRequestResponse) response).getSession();

        client.clientInterface.setLoginState(true);
    }
}
